<template>
  <el-cascader
    style="width: 100%"
    v-model="val"
    :options="options"
    :props="props"
    @change="handleChange"
  />
</template>

<script lang="ts">
import { props, mixin } from '@/components/control/basis'
import { arrToTree } from '@/utils/utils.ts'

export default {
  name: 'SelectCom',
  props: { ...props },
  mixins: [mixin],
  watch: {},
  computed: {
    options() {
      const options = arrToTree(this.option, null, {
        label: this.props.label,
        parentId: this.props.value,
      })
      console.log(options, 777)
      return options
    },
  },
  data() {
    return {
      val: '',
    }
  },
  methods: {},
}
</script>

<style scoped lang="scss"></style>
